package cn.kgc.vue.shiro;

import lombok.Data;
import org.apache.shiro.authc.AuthenticationToken;

import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import java.net.http.HttpRequest;

/**
 * @Author 张航
 * @Date 2024/7/3
 * @Description
 */
@Data
public class JWTToken implements AuthenticationToken {
  private String token;
  private ServletRequest request;
  private String s1;

  public JWTToken(String token, ServletRequest request,String s1) {
      this.token = token;
      this.request = request;
      this.s1 = s1;

  }



   //获取身份信息
    @Override
    public Object getPrincipal() {
        return token;
    }

    ///获取用户凭证
    @Override
    public Object getCredentials() {
        return token;
    }

    public Object getS1(){
      return s1;
    }

    public ServletRequest getRequest() {
        return request;
    }

    public void setRequest(ServletRequest request) {
        this.request = request;
    }
}
